package com.cvit.cn.dao;

import com.cvit.cn.bean.Commodity;
import com.cvit.cn.bean.CommodityExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface CommodityMapper {
    long countByExample(CommodityExample example);

    int deleteByExample(CommodityExample example);

    //根据id删除
    int deleteByPrimaryKey(String id);

    //添加物品信息
    //int insert(Commodity record);

    int insertSelective(Commodity record);

    //查询所有
    List<Commodity> selectByExample(CommodityExample example);

    Commodity selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") Commodity record, @Param("example") CommodityExample example);

    int updateByExample(@Param("record") Commodity record, @Param("example") CommodityExample example);

    int updateByPrimaryKeySelective(Commodity record);

    int updateByPrimaryKey(Commodity record);

	//根据releaseId和commenttype=1查询
    List<Commodity> selectByReleaseId(String releaseId);
    
  //根据releaseId和commenttype=0查询
    List<Commodity> selectByReleaseIds(String releaseId);

	//修改物品信息
    int updataComm(Commodity commodity);

	int insertComm(Commodity c);

	//添加导入excel表格
	int insertExcel(Commodity record);

	//根据commodityType=1查询
	List<Commodity> selectByType(CommodityExample example);

	//把状态值都改成commodityType=0
	void updataType(Commodity comm);

	//根据ReleaseId给commodityTye赋值为1
	void updataReleaseId(Commodity comm);

	//按id批量删除
	int deleCommId(String[] ids);

	//按照release删除物品
	void deleReleaseId(String releaseId);

	//List<Commodity> seleReleaseId(CommodityExample example);

}